package org.bing.engine.controller.service;

import org.bing.engine.controller.lifecycle.GeneralContainerLifecycle;

public class AutomaticRegistry {
    private GeneralContainerLifecycle container;
    private ContainerRegistry registry;
    private String name;

    public void setRegistry(ContainerRegistry registry) {
        this.registry = registry;
    }

    public void setContainer(GeneralContainerLifecycle container) {
        this.container = container;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void reg() {
        if (container != null && name != null) {
            registry.reg(name, container);
        }
    }
}
